﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div class="top_bar">
  <div class="top_bar_link">
    <%
    if (Request.IsAuthenticated) {
        var cus = SDT.Model.CustomerManager.GetUser(Page.User.Identity.Name);
    %>
            Xin chào <b><%= Html.ActionLink(cus!=null && cus.FullName !=null && cus.FullName!=string.Empty? cus.FullName: Page.User.Identity.Name, "index", "order", new { area = "user" }, null)%></b>!
            [ <%= Html.ActionLink("Thoát", "logoff", "account", new {area="" },null)%> ]
    <%
        }
        else {
    %>
            <a href="/account/register"><strong>Đăng ký</strong></a>&nbsp;|&nbsp; 
            <b><%= Html.ActionLink("Đăng nhập", "logon", "account", new { area = "" }, null)%></b> 
    <%
        }
    %>
  </div>
  <div class="top_bar_icon">
  	<a href="#"><img src="/images/mq/i_fb.png" width="31" height="31" /></a>
    <a href="#"><img src="/images/mq/i_tw.png" width="31" height="31" /></a>
  <a href="#"><img src="/images/mq/i_mail.png" width="31" height="31" /></a></div>
  <div class="sr">
        <div class="bg_sr"><input type="text" class="txtsr" /></div>
        <div><input type="button" class="btn_sr" />
        </div>
  </div>
</div>
<%var proincart = Session[SDT.Lib.Common.Messages.Cart] != null ? (SDT.Site.ViewModels.CartViewModels)Session[SDT.Lib.Common.Messages.Cart] : new SDT.Site.ViewModels.CartViewModels(); %>
<div class="basket"><img src="/images/mq/i_basket.png" style="vertical-align:middle" />: <span class="t_red"><a href="/shopping/cart" style="color:Red"><strong><%=proincart.ProductInCarts!=null? proincart.ProductInCarts.Count:0%></strong></a></span> sản phẩm</div>
